package cn.hnbjx.prepaid.dao;

import cn.hnbjx.prepaid.pojo.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AdminDao {
    @Select("select * from `admin` where `name`=#{name} and `password`=#{password}")
    Admin findUser(@Param("name") String name,@Param("password") String password);
    @Update("update `admin` set password=#{newPassword} where id=#{id}")
    int updatePassword(@Param("newPassword") String newPassword, @Param("id") Integer id);
}
